import http from '@/utils/http/axios'
import { BasicResponseModel } from '@/api/model/baseModel'
/**
 * @description: 字典列表
 */
export function getSystemDictionary(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/dictionary/list',
    method: 'GET',
    params
  })
}
/**
 * @description: 字典详情
 */
export function getSystemDictionaryDetail(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/dictionary/detail',
    method: 'GET',
    params
  })
}
/**
 * @description: 删除字典详情
 */
export function removeSystemDictionary(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/dictionary/delete',
    method: 'POST',
    params
  })
}
/**
 * @description: 保存字典
 */
export function setSystemDictionaryDetail(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/dictionary/save',
    method: 'POST',
    params
  })
}
/**
 * @description: 资源列表
 */
export function getSystemAuthority(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/resource/list',
    // url: 'https://yapi.madaomall.com/mock/204/resource/list',
    method: 'GET',
    params
  })
}
/**
 * @description: 编辑资源
 */
export function setSystemAuthority(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/resource/save',
    method: 'POST',
    params
  })
}
/**
 * @description: 删除资源
 */
export function removeSystemAuthority(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/resource/remove',
    method: 'POST',
    params
  })
}
/**
 * @description: 修改员工信息
 */
export function operatorSave(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/operator/save',
    method: 'POST',
    params
  })
}
/**
 * @description: 获取员工详情
 */
export function operatorDetail(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/operator/detail',
    method: 'GET',
    params
  })
}
/**
 * @description: 获取员工列表
 */
export function operatorList(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/operator/list',
    method: 'GET',
    params
  })
}
/**
 * @description: 获取岗位列表
 */
export function roleList(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/role/list',
    method: 'GET',
    params
  })
}

/**
 * @description: 默认岗位列表
 */
export function getSystemRle(params: any) {
  return http.request<BasicResponseModel<any[]>>({
    url: '/api/role/default/list',
    // url: 'https://yapi.madaomall.com/mock/204/role/default/list',
    method: 'GET',
    params
  })
}

/**
 * @description: 默认岗位详情
 */
export function getSystemRleDetail(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/role/detail',
    // url: 'https://yapi.madaomall.com/mock/204/role/detail',
    method: 'GET',
    params
  })
}
/**
 * @description: 保存默认岗位
 */
export function getSystemRleSave(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/role/default/save',
    // url: 'https://yapi.madaomall.com/mock/204/role/default/save',
    method: 'POST',
    params
  })
}
/**
 * @description: 删除默认岗位
 */
export function getSystemRleDelete(params: any) {
  return http.request<BasicResponseModel>({
    url: '/api/role/delete',
    method: 'POST',
    params
  })
}
